<template>
  <div class="breadcrumb">
    <span class="breadcrumbItem" v-for="(item,index) in $route.matched" :key="index">
      <router-link :to="item.path || '/'">{{item.meta.breadcrumb}}</router-link>
      <span v-if="index<$route.matched.length-1">--></span>
    </span>
  </div>
</template>

<script>
export default {
  mounted() {
    console.log(this.$route.matched);
  }
};
</script>

<style lang="less" scoped>
.breadcrumb {
  padding-bottom: 24px;
}
</style>